package cn.harry.wx.entity;

import cn.hutool.core.date.DatePattern;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * CMS文章中心
 *
 * @author honghh
 * Date 2021-04-08 16:19:27
 * Copyright (C) www.tech-harry.cn
 */
@Data
@TableName("cms_article")
public class CmsArticle implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @TableId
    @ApiModelProperty(value = "ID")
    private Long id;
    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id")
    private Long userId;
    /**
     * 文章类型[1:普通文章,5:帮助中心]
     */
    @ApiModelProperty(value = "文章类型[1:普通文章,5:帮助中心]")
    private Integer type;
    /**
     * 标题
     */
    @ApiModelProperty(value = "标题")
    private String title;
    /**
     * 文章摘要
     */
    @ApiModelProperty(value = "文章摘要")
    private String summary;
    /**
     * 文章标签
     */
    @ApiModelProperty(value = "文章标签")
    private String tags;
    /**
     * 内容
     */
    @ApiModelProperty(value = "内容")
    private String content;
    /**
     * 分类
     */
    @ApiModelProperty(value = "分类")
    private String category;
    /**
     * 二级目录
     */
    @ApiModelProperty(value = "二级目录")
    private String subCategory;
    /**
     * 点击次数
     */
    @ApiModelProperty(value = "点击次数")
    private Integer openCount;
    /**
     * 生效时间
     */
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN, timezone = "GMT+8")
    @ApiModelProperty(value = "生效时间")
    private Date startTime;
    /**
     * 失效时间
     */
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN, timezone = "GMT+8")
    @ApiModelProperty(value = "失效时间")
    private Date endTime;
    /**
     * 指向外链
     */
    @ApiModelProperty(value = "指向外链")
    private String targetLink;
    /**
     * 文章首图
     */
    @ApiModelProperty(value = "文章首图")
    private String image;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN, timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    /**
     * 修改时间
     */
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN, timezone = "GMT+8")
    @ApiModelProperty(value = "修改时间")
    private Date modifyTime;
    /**
     * 有效状态：0->无效；1->有效
     */
    @TableLogic
    @ApiModelProperty(value = "有效状态：0->无效；1->有效")
    private Integer valid;
}
